<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>propsData Option 全局扩展的数据传递</title>
  <script src="../assets/js/vue.js"></script>
</head>

<body>
  <h1>propsData Option 全局扩展的数据传递</h1>
  <hr>
  <header></header>
  <script type="text/javascript">
    var header_a=Vue.extend({
      template:`<p>{{message}}-{{a}}</p>`,
      data:function(){
        return{
          message:'Hello, I am header!'
        }
      },
      props:['a']
    });

    new header_a({propsData:{a:1}}).$mount('header')
  </script>
</body>

</html>